import service from '@/utils/request'

export const getServiceStationList = (params) => { // 会员列表
    return new Promise((resolve,reject)=>{
      service.post('/station/getServiceStationList',params)
      .then(res=>{
        resolve(res) 
      })
    })
}

export const addStation = (params) => { // 修好会员
    return new Promise((resolve,reject)=>{
      service.post('/station/saveServiceStation',params)
      .then(res=>{
        resolve(res) 
      })
    })
}

export const getCategoryList = (params) => { // 栏目列表
  return new Promise((resolve,reject)=>{
    service.post('/category/getCategoryList',params)
    .then(res=>{
      resolve(res) 
    })
  })
}

export const saveCategory = (params) => { // 修好栏目
  return new Promise((resolve,reject)=>{
    service.post('/category/saveCategory',params)
    .then(res=>{
      resolve(res) 
    })
  })
}

export const delCategory = (params) => { // 删除栏目
  return new Promise((resolve,reject)=>{
    service.post('/category/deleteCategory',params)
    .then(res=>{
      resolve(res) 
    })
  })
}

export const getNewsList = (params) => { // 删除栏目
  return new Promise((resolve,reject)=>{
    service.post('/news/getNewsList',params)
    .then(res=>{
      resolve(res) 
    })
  })
}

export const saveNews = (params) => { 
  return new Promise((resolve,reject)=>{
    service.post('/news/saveNews',params)
    .then(res=>{
      resolve(res) 
    })
  })
}

export const delNews = (params) => { // 删除新闻
  return new Promise((resolve,reject)=>{
    service.post('/news/deleteNews',params)
    .then(res=>{
      resolve(res) 
    })
  })
}

export const publishNews = (params) => { // 删除新闻
  return new Promise((resolve,reject)=>{
    service.post('/news/publishNews',params)
    .then(res=>{
      resolve(res) 
    })
  })
}